1. Field of the Invention
The present invention relates to a moving image encoding apparatus, a control method therefor, and a non-transitory computer readable storage medium.
2. Description of the Related Art
In recent years, video cameras for performing high definition recording in a storage medium using a disk medium, hard disk, or memory have become commercially available. Since these video cameras are readily portable and can record high-quality video, they are expected to become increasingly widespread. Such devices save video as a video stream (encoded stream) compression-encoded using, for example, MPEG-4 Part 10: AVC (ISO/IEC 14496-10, also known as H.264) in a recording operation, thereby achieving high definition recording. This compression encoding scheme adopts inter-frame prediction (inter prediction) using the correlation between images, and intra-frame prediction (intra prediction) using the correlation within a frame, while realizing high-efficiency compression encoding using arithmetic coding.
H.264 defines a virtual buffer to which an encoded stream is input at a given transfer rate and from which the encoded stream of each picture is extracted at a decoding time. It is possible to maintain the playback compatibility of generated encoded streams by controlling the code amount to prevent a failure of the virtual buffer.
When recording a plurality of scenes, seamless recording in which the virtual buffers of the encoded streams of the respective scenes are seamlessly connected is performed, thereby enabling a decoder to smoothly play back the streams of some of the scenes without stop. Furthermore, in order not to miss an unexpected opportunity to capture an image, video cameras having a pre-recording function of encoding and buffering a video input before the start of recording, and recording, upon start of recording, data for a predetermined past time as well have made their debut.
There has been proposed an encoding apparatus for recording, in management information, time information and a buffer occupation amount necessary for seamless recording as seamless information (see Japanese Patent Laid-Open No. 2007-306257).